package com.example.demo.pojos;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "collection_hk", schema = "byxm", catalog = "")
public class CollectionHk {
    private int hkId;
    private String hkName;
    private String hkCjnr;
    private Integer hkPhone;
    private String hkEmail;
    private String hkLynr;
    private String source;
    private Date hkTime;

    @Id
    @Column(name = "hk_id", nullable = false)
    public int getHkId() {
        return hkId;
    }

    public void setHkId(int hkId) {
        this.hkId = hkId;
    }

    @Basic
    @Column(name = "hk_name", nullable = true, length = 20)
    public String getHkName() {
        return hkName;
    }

    public void setHkName(String hkName) {
        this.hkName = hkName;
    }

    @Basic
    @Column(name = "hk_cjnr", nullable = true, length = 200)
    public String getHkCjnr() {
        return hkCjnr;
    }

    public void setHkCjnr(String hkCjnr) {
        this.hkCjnr = hkCjnr;
    }

    @Basic
    @Column(name = "hk_phone", nullable = true)
    public Integer getHkPhone() {
        return hkPhone;
    }

    public void setHkPhone(Integer hkPhone) {
        this.hkPhone = hkPhone;
    }

    @Basic
    @Column(name = "hk_email", nullable = true, length = 30)
    public String getHkEmail() {
        return hkEmail;
    }

    public void setHkEmail(String hkEmail) {
        this.hkEmail = hkEmail;
    }

    @Basic
    @Column(name = "hk_lynr", nullable = true, length = 100)
    public String getHkLynr() {
        return hkLynr;
    }

    public void setHkLynr(String hkLynr) {
        this.hkLynr = hkLynr;
    }

    @Basic
    @Column(name = "source", nullable = true, length = 50)
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "hk_time", nullable = true)
    public Date getHkTime() {
        return hkTime;
    }

    public void setHkTime(Date hkTime) {
        this.hkTime = hkTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CollectionHk that = (CollectionHk) o;
        return hkId == that.hkId &&
                Objects.equals(hkName, that.hkName) &&
                Objects.equals(hkCjnr, that.hkCjnr) &&
                Objects.equals(hkPhone, that.hkPhone) &&
                Objects.equals(hkEmail, that.hkEmail) &&
                Objects.equals(hkLynr, that.hkLynr) &&
                Objects.equals(source, that.source) &&
                Objects.equals(hkTime, that.hkTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(hkId, hkName, hkCjnr, hkPhone, hkEmail, hkLynr, source, hkTime);
    }
}
